package com.example.demo.controller.AuthorControl;

import com.example.demo.entity.BackResponseEntity;
import com.example.demo.entity.requestJson.DeleteReq;
import com.example.demo.entity.responseJson.HomepageAllBInfoRes;
import com.example.demo.service.AuthorCreationService;
import com.example.demo.service.BookInformationShowService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : 洪俊新
 * @date : 2021/3/9 15:24
 * @description:
 */
@RestController
@RequestMapping("/author/bookinformationshows")
@Api(value = "书籍详情页信息展示接口", tags = "书籍详情页展示接口")
public class BookShowController {
    @Autowired
    private BookInformationShowService bookInformationShowService;
    @Autowired
    private AuthorCreationService authorCreationService;

    @ApiOperation(value = "书籍详情页接口", notes = "传book_id,还需要调用/author/creation/querymoreinfo接口")
    @ApiOperationSupport(author = "杨")
    @ApiResponses(
            @ApiResponse(code = 200, message = "处理成功")
    )

    @GetMapping("/queryallbookinfo")
    public BackResponseEntity<HomepageAllBInfoRes> queryAllBookInformation(DeleteReq deleteReq) {
       return bookInformationShowService.queryBookAllInfo(deleteReq);
    }
}
